﻿@using BankCreditPortfolio.Core.Helpers.MenuHelper
@{
	if (ViewData["Menu"] != null)
	{
		var menu = (Menu)ViewData["Menu"];
		if (menu.MainMenuItems != null)
		{
			<div class="curr_pg">
			<div class="title">Menu</div>
			<div class="functions">
			<div class="functions_i clrfix" >
			<div class="ddsmoothmenu" id="smoothmenu1">
			<ul class="clrfix">
			@foreach (MainMenuItem mainMenuItem in menu.MainMenuItems)
			{
				<li><a href="#">@mainMenuItem.Text</a>
				@if (mainMenuItem.SubMenuItems != null)
				{
					<ul>
					@foreach (SubMenuItem subMenuItem in mainMenuItem.SubMenuItems)
					{
						<li><a href="@Url.Action(subMenuItem.Action, subMenuItem.Controller)">@subMenuItem.Text</a></li>
					}
					</ul>
				}
				</li>
			}
			</ul>
			</div>
			</div>
			</div>
			</div>
		}
		
	}
}
